﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Company.Database.Base.Entities
{
    /// <summary>
    /// 设备实体
    /// </summary>
    [Table(nameof(DeviceEntity))]
    public class DeviceEntity
    {
        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]//自增
        public int Id { get; set; }
        /// <summary>
        /// 设备名称
        /// </summary>
        public string? Name { get; set; }
        /// <summary>
        /// 所属医院ID
        /// </summary>
        public int HospitalId { get; set; }
        /// <summary>
        /// 所属工作站ID
        /// </summary>
        public int StationId { get; set; }
        /// <summary>
        /// 设备编码
        /// </summary>
        public string? Code { get; set; }
        /// <summary>
        /// 设备型号
        /// </summary>
        public string? Model { get; set; }
        /// <summary>
        /// 设备供应商
        /// </summary>
        public string? Supplier { get; set; }
        /// <summary>
        /// 通讯协议：串口，网口（服务器或客户端）
        /// </summary>
        public int Protocol { get; set; }
        public string? IpAddress { get; set; }
        public int Port { get; set; }
        public string? SerialName { get; set; }
        public int BaudRate { get; set; }
        /// <summary>
        /// 解码器
        /// </summary>
        public string? ClassName { get; set; }
        /// <summary>
        /// 0=启用|1=停用
        /// </summary>
        public int Status { get; set; }
    }
}
